﻿using BaBaoFan.Modifier.Data;
using BaBaoFan.Modifier.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace BaBaoFan.Modifier.Service
{
    public class CoinInfoService : ICoinInfoService
    {
        private readonly ICoinInfoRepository _coinInfoRepository;
        public CoinInfoService(ICoinInfoRepository coinInfoRepository)
        {
            _coinInfoRepository = coinInfoRepository;
        }

        public bool Add(CoinInfo coinInfoInput)
        {
            return _coinInfoRepository.Add(coinInfoInput);
        }

        public bool Delete(int[] ids)
        {
            return _coinInfoRepository.Delete(ids);
        }

        public IEnumerable<CoinInfoDto> GetAllCoinInfos()
        {
            return _coinInfoRepository.GetAllCoinInfos();
        }

        public CoinInfo GetCoinInfoById(int id)
        {
            return _coinInfoRepository.GetCoinInfoById(id);
        }

        public IEnumerable<CoinInfoDto> GetCoinInfos()
        {
            return _coinInfoRepository.GetCoinInfos();
        }

        public IEnumerable<CoinInfoDto> GetCoinInfosByPoolId(int poolId)
        {
            return _coinInfoRepository.GetCoinInfosByPoolId(poolId);
        }

        public IEnumerable<CoinInfoDto> Search(CoinInfoCondition infoCondition)
        {
            return _coinInfoRepository.Search(infoCondition);
        }

        public bool Update(CoinInfo coinInfoInput)
        {
            return _coinInfoRepository.Update(coinInfoInput);
        }
    }
}
